<?php
	
	// Add RSS links to <head> section
	automatic_feed_links();
	
	// Load jQuery
	if ( !is_admin() ) {
	   wp_deregister_script('jquery');
	   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false);
	   wp_enqueue_script('jquery');
	}
	
	// Clean up the <head>
	function removeHeadLinks() {
    	remove_action('wp_head', 'rsd_link');
    	remove_action('wp_head', 'wlwmanifest_link');
    }
    add_action('init', 'removeHeadLinks');
    remove_action('wp_head', 'wp_generator');
    
    if (function_exists('register_sidebar')) {
    	register_sidebar(array(
    		'name' => 'Sidebar One',
    		'id'   => 'sidebar-one',
    		'description'   => 'These are widgets for the sidebar 1.',
    		'before_widget' => '<div class="widget-item">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h4>',
    		'after_title'   => '</h4>'
    	));
    }
	
	if (function_exists('register_sidebar')) {
    	register_sidebar(array(
    		'name' => 'Sidebar Two',
    		'id'   => 'sidebar-two',
    		'description'   => 'These are widgets for the sidebar 2.',
    		'before_widget' => '<div class="widget-item">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h4>',
    		'after_title'   => '</h4>'
    	));
    }
	
	add_action('init','create_post_type');
	function create_post_type(){
		register_post_type('c4der_portfolio',
			array(
				'labels' => array(
					'name' 			=> __('Portfolio'),
					'sigular_name' 	=> __('Portfolio')
				),
				'public' 		=> true,
				'has_archive'	=> true,
				'rewrite' 		=> array('slug' => 'portfolio','with_front' => FALSE),
				'supports' 		=> array(
					'title',
					'editor',
					'thumbnail',
					'excerpt',
					'custom-fields'
				)
			)
		
		);
	}
?>